//
//  JHSSickDevideModel.m
//  病例管理
//
//  Created by chenWei on 2017/3/24.
//  Copyright © 2017年 陈伟. All rights reserved.
//

#import "JHSSickDevideModel.h"
#import "JHSNetworkingTool.h"
#import "JHSNetworkTool.h"
#import <YYModel.h>
#import <MJExtension.h>

@implementation JHSSickDevideModel

+ (void)devideNetDataWithURL:(NSString *)urlStr withParameters:(id)parameters withSuccessBlock:(void (^)(id))successBK withFailureBlock:(void (^)(NSError *))failureBK
{
    

    JHSNetworkingTool *tool = [JHSNetworkingTool shareManager];
    
    tool.requestSerializer = [[AFHTTPRequestSerializer alloc] init];
    
    [tool postWithURLStr:urlStr withParameters:parameters withSuccessBlock:^(id responseBody) {

        
        NSArray *dicArr = responseBody[@"data"];
        
        //把字典数组转为模型数组
//        NSMutableArray *modelArr = [JHSSickDevideModel mj_objectArrayWithKeyValuesArray:dicArr];
        
        successBK(dicArr);
        
    } withFailureBlock:^(NSError *error) {
        
        failureBK(error);
    }];
    
    
    
}


- (NSString *)description
{
    return [self yy_modelDescription];
}



@end
